Optimal. Leaf size=68 \[ -\frac {\sqrt {d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {1807, 844, 217, 203, 266, 63, 208} \[ -\frac {\sqrt {d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 203
Rule 208
Rule 217
Rule 266
Rule 844
Rule 1807
Rubi steps
\begin {align*} \int \frac {(d+e x)^2}{x^2 \sqrt {d^2-e^2 x^2}} \, dx &=-\frac {\sqrt {d^2-e^2 x^2}}{x}-\frac {\int \frac {-2 d^3 e-d^2 e^2 x}{x \sqrt {d^2-e^2 x^2}} \, dx}{d^2}\\ &=-\frac {\sqrt {d^2-e^2 x^2}}{x}+(2 d e) \int \frac {1}{x \sqrt {d^2-e^2 x^2}} \, dx+e^2 \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx\\ &=-\frac {\sqrt {d^2-e^2 x^2}}{x}+(d e) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {d^2-e^2 x}} \, dx,x,x^2\right )+e^2 \operatorname {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )\\ &=-\frac {\sqrt {d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\frac {(2 d) \operatorname {Subst}\left (\int \frac {1}{\frac {d^2}{e^2}-\frac {x^2}{e^2}} \, dx,x,\sqrt {d^2-e^2 x^2}\right )}{e}\\ &=-\frac {\sqrt {d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 68, normalized size = 1.00 \[ -\frac {\sqrt {d^2-e^2 x^2}}{x}+e \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-2 e \tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.71, size = 79, normalized size = 1.16 \[ -\frac {2 \, e x \arctan \left (-\frac {d - \sqrt {-e^{2} x^{2} + d^{2}}}{e x}\right ) - 2 \, e x \log \left (-\frac {d - \sqrt {-e^{2} x^{2} + d^{2}}}{x}\right ) + \sqrt {-e^{2} x^{2} + d^{2}}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.26, size = 107, normalized size = 1.57 \[ \arcsin \left (\frac {x e}{d}\right ) e \mathrm {sgn}\relax (d) - 2 \, e \log \left (\frac {{\left | -2 \, d e - 2 \, \sqrt {-x^{2} e^{2} + d^{2}} e \right |} e^{\left (-2\right )}}{2 \, {\left | x \right |}}\right ) + \frac {x e^{3}}{2 \, {\left (d e + \sqrt {-x^{2} e^{2} + d^{2}} e\right )}} - \frac {{\left (d e + \sqrt {-x^{2} e^{2} + d^{2}} e\right )} e^{\left (-1\right )}}{2 \, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 93, normalized size = 1.37 \[ -\frac {2 d e \ln \left (\frac {2 d^{2}+2 \sqrt {d^{2}}\, \sqrt {-e^{2} x^{2}+d^{2}}}{x}\right )}{\sqrt {d^{2}}}+\frac {e^{2} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{\sqrt {e^{2}}}-\frac {\sqrt {-e^{2} x^{2}+d^{2}}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.96, size = 64, normalized size = 0.94 \[ e \arcsin \left (\frac {e x}{d}\right ) - 2 \, e \log \left (\frac {2 \, d^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-e^{2} x^{2} + d^{2}} d}{{\left | x \right |}}\right ) - \frac {\sqrt {-e^{2} x^{2} + d^{2}}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \left \{\begin {array}{cl} \frac {e^2\,\ln \left (x\,\sqrt {-e^2}+\sqrt {d^2-e^2\,x^2}\right )}{\sqrt {-e^2}}-\frac {\sqrt {d^2-e^2\,x^2}}{x}-\frac {2\,d\,e\,\ln \left (\frac {\sqrt {d^2}+\sqrt {d^2-e^2\,x^2}}{x}\right )}{\sqrt {d^2}} & \text {\ if\ \ }e^2<0\\ \int \frac {e^2}{\sqrt {d^2-e^2\,x^2}}+\frac {d^2}{x^2\,\sqrt {d^2-e^2\,x^2}}+\frac {2\,d\,e}{x\,\sqrt {d^2-e^2\,x^2}} \,d x & \text {\ if\ \ }\neg e^2<0 \end {array}\right . \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 4.30, size = 207, normalized size = 3.04 \[ d^{2} \left (\begin {cases} - \frac {e \sqrt {\frac {d^{2}}{e^{2} x^{2}} - 1}}{d^{2}} & \text {for}\: \left |{\frac {d^{2}}{e^{2} x^{2}}}\right | > 1 \\- \frac {i e \sqrt {- \frac {d^{2}}{e^{2} x^{2}} + 1}}{d^{2}} & \text {otherwise} \end {cases}\right ) + 2 d e \left (\begin {cases} - \frac {\operatorname {acosh}{\left (\frac {d}{e x} \right )}}{d} & \text {for}\: \left |{\frac {d^{2}}{e^{2} x^{2}}}\right | > 1 \\\frac {i \operatorname {asin}{\left (\frac {d}{e x} \right )}}{d} & \text {otherwise} \end {cases}\right ) + e^{2} \left (\begin {cases} \frac {\sqrt {\frac {d^{2}}{e^{2}}} \operatorname {asin}{\left (x \sqrt {\frac {e^{2}}{d^{2}}} \right )}}{\sqrt {d^{2}}} & \text {for}\: d^{2} > 0 \wedge e^{2} > 0 \\\frac {\sqrt {- \frac {d^{2}}{e^{2}}} \operatorname {asinh}{\left (x \sqrt {- \frac {e^{2}}{d^{2}}} \right )}}{\sqrt {d^{2}}} & \text {for}\: d^{2} > 0 \wedge e^{2} < 0 \\\frac {\sqrt {\frac {d^{2}}{e^{2}}} \operatorname {acosh}{\left (x \sqrt {\frac {e^{2}}{d^{2}}} \right )}}{\sqrt {- d^{2}}} & \text {for}\: d^{2} < 0 \wedge e^{2} < 0 \end {cases}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________